﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MachineQA.Model;

namespace MachineQA.DataAccess
{
    /// <summary>
    /// Interface used for production and mock repository of Location items.
    /// </summary>
    public interface ILocationRepository
    {
        /// <summary>
        /// Event that is thrown when an item is added to the locations repository.
        /// </summary>
        event EventHandler<LocationAddedOrRemovedEventArgs> LocationAddedOrRemoved;

        /// <summary>
        /// Adds a location to the repository
        /// </summary>
        /// <param name="location">The location to add.</param>
        void AddLocation(Location location);

        /// <summary>
        /// Removes the specified location from the repository.
        /// </summary>
        /// <param name="location">The location to remove.</param>
        void RemoveLocation(Location location);

        /// <summary>
        /// Returns the list of locations contained in the repository.
        /// </summary>
        /// <returns>A List<Location> containing the locations in the repository.</Location></returns>
        List<Location> GetLocations();

        /// <summary>
        /// Checks to see if the specified location exists in the repository.
        /// </summary>
        /// <param name="location">The location to check for.</param>
        /// <returns>Boolean whether or not the location is contained in the repository.</returns>
        bool ContainsLocation(Location location);
    }
}
